// components/leavework2/leavework2.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    item:Object
  },

  /**
   * 组件的初始数据
   */
  data: {
    word:true,  //文字展开
  },

  /**
   * 组件的方法列表
   */
  methods: {
    //文字展开或收起
    word:function(){
      this.setData({
        word: !this.data.word
    })
    },
    article(e) {
      console.log(e.currentTarget.dataset.articleid)
      console.log(this.data.item.lmModule)
      if (this.data.item.lmModule.code=="daily_share"){
        //精英每日分享详情页
        wx.navigateTo({
          url: '../../pages/sharetent/sharetent?artId=' + e.currentTarget.dataset.articleid,
        })
      }else if(this.data.item.lmModule.code=="business_wire"){
        //商业资讯详情页
        wx.navigateTo({
          url: '../../pages/Publdetails/Publdetails?artId=' + e.currentTarget.dataset.articleid,
        })
      }else if(this.data.item.lmModule.code=="mutual_information"){
        //互助中心详情页
        wx.navigateTo({
          url: '../../pages/Mutualdetails/details?artId=' + e.currentTarget.dataset.articleid,
        })
      }else if(this.data.item.lmModule.code=="activity_call"){
        //活动组织详情页
        wx.navigateTo({
          url: '../calleddetails/calleddetails?atyId=' + e.currentTarget.dataset.articleid,
        })
      }else if(this.data.item.lmModule.code=="recruit_cooperate"){
        //招聘合作详情页
        wx.navigateTo({
          url: '../../pages/recruidetail/recruidetail?recruitId=' + e.currentTarget.dataset.articleid,
        })
      }
    }
  }
})
